Org-mode supports
insertion of empty structural elements (like
#+BEGIN_SRC and #+END_SRC pairs) with
just a few key strokes. This is achieved through a native
template expansion mechanism. Note that Emacs has several other
template mechanisms which could be used in a similar way, for
example yasnippet.
To insert a structural element, type a ‘<’, followed by a template selector and <TAB>. Completion takes effect only when the above keystrokes are typed on a line by itself.
The following template selectors are currently supported.
| s | #+begin_src ...
#+end_src |
| e | #+begin_example ...
#+end_example |
| q | #+begin_quote ...
#+end_quote |
| v | #+begin_verse ...
#+end_verse |
| c | #+begin_center ...
#+end_center |
| l | #+begin_latex ...
#+end_latex |
| L | #+latex: |
| h | #+begin_html ...
#+end_html |
| H | #+html: |
| a | #+begin_ascii ...
#+end_ascii |
| A | #+ascii: |
| i | #+include:
line |
For example, on an empty line, typing "<e" and then pressing TAB, will expand into a complete EXAMPLE template.
You can install additional templates by customizing the
variable org-structure-template-alist. See the
docstring of the variable for additional details.